package com.cskaoyan.mapper;

import com.cskaoyan.bean.entity.WxCoupon;
import com.cskaoyan.bean.entity.WxCouponExample;
import com.cskaoyan.bean.entity.WxCouponInfo;
import com.cskaoyan.bean.vo.WxCouponVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface WxCouponMapper {
    long countByExample(WxCouponExample example);

    int deleteByExample(WxCouponExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(WxCoupon record);

    int insertSelective(WxCoupon record);

    List<WxCoupon> selectByExample(WxCouponExample example);

    WxCoupon selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") WxCoupon record, @Param("example") WxCouponExample example);

    int updateByExample(@Param("record") WxCoupon record, @Param("example") WxCouponExample example);

    int updateByPrimaryKeySelective(WxCoupon record);

    int updateByPrimaryKey(WxCoupon record);

    List<WxCouponVo> Custom_selectByExample(WxCouponExample example);

    List<WxCouponInfo> selectMyCouponInfos(int status, int id);

    int valid(String code);

    List<WxCouponInfo> selectMyAvailableCouponInfos(Integer id);
}
